import request from '../../utils/request'

// 获取用户列表
export const getUserList = params => {
  return request({
    method: 'GET',
    url: '/users',
    params
  })
}

// 修改用户
export const upDateUser = (id, data) => {
  return request({
    method: 'PUT',
    url: `/users/${id}`,
    // id,
    data
  })
}

// 添加用户
export const addUser = data => {
  return request({
    method: 'POST',
    url: '/users',
    data
  })
}

// 删除用户
export const deleteUser = id => {
  return request({
    method: 'DELETE',
    url: `/users/${id}`
  })
}
